package com.jt.consumer.service;

import feign.hystrix.FallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * FeignClient 注解描述为远程服务调用接口,
 * 此接口中我们应该定义这些服务
 */
@FeignClient(name="sca-provider",contextId = "remoteProviderService",fallbackFactory = ProviderFallbackFactory.class)
public interface RemoteProviderService {
    @GetMapping("/provider/echo/{string}")
    String echoMessage(@PathVariable("string") String string);
}
